<template>
    <div>

    <van-nav-bar
  :title="message"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
    </div>
</template>

<script setup>
import { onMounted, ref, reactive,inject} from "vue";
const main=reactive({
    props: {
    mytitle:""
  }
})
const message = inject('mytitle'); // 注入父组件提供的数据
const onClickLeft=()=>{
    history.back();
};

onMounted(()=>{
    console.log(main);
})
</script>

<style  scoped>

</style>